

    Loader.implement
    (
        {
            /**
             * Create a new network request object.
             * @return {XMLHttpRequest}
             */
            createNewRequest: new function () 
            {
                if (window.XMLHttpRequest) return function () 
                {
                    return new XMLHttpRequest;
                }
                
                if (window.ActiveXObject) return function () 
                {
                    return new ActiveXObject('MSXML2.XMLHTTP.3.0');
                }
                
                return function () 
                {
                    throw new Error('XMLHttpRequest is not supported');
                }
            }

            /**
             * Synchronously load a same domain resource.
             * 
             * @param {String} path The path to the resource to load
             * @return {String}    The contents of the loaded resources
             */
         ,  load: function (path) 
            {
                var xhr= this.createNewRequest()
                ,   status;
                
                xhr.open('GET', path, false);
                xhr.send(null);
                
                if (200 === xhr.status)
                    return xhr.responseText;
                    
                status= xhr.status + ':' + xhr.statusText;    
                    
                throw new Error('Could not load from path ' + path + ' - ' + status);
            }
        }
    );
    
    /**
     * A utility class to load same domain text resources.
     * @constructor
     */
    function Loader () {};
